import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {RouterModule, Routes } from '@angular/router';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { InvestComponent } from './invest/invest.component';
import { AboutComponent } from './about/about.component';
import { ParentComponent } from './parent/parent.component';
import { SonComponent } from './son/son.component';
import { FormComponent } from './form/form.component';

const appRouter: Routes = [
  { path: 'home',         component: HomeComponent },
  { path: 'invest',      component: InvestComponent },
  { path: 'about',      component: AboutComponent },
  { path: 'form',      component: FormComponent },
]
@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    InvestComponent,
    AboutComponent,
    ParentComponent,
    SonComponent,
    FormComponent
  ],
  imports: [
    FormsModule,
    BrowserModule,
    RouterModule.forRoot(appRouter)
  ],
  providers: [],
  bootstrap: [AppComponent]
})

export class AppModule { }
